This function generates a sawtooth-shaped signal profile. Each sawtooth consists of a defined number of steps (increments).
LGF_CountRisInDWord in the future!| LGF_SawTooth (FB) | ||||||||
|---|---|---|---|---|---|---|---|---|
| Int | startValue | value | Int | |||||
| Time | timeRange | |||||||
| Int | incrementRange | |||||||
| Int | numberSteps | |||||||
| Bool | endlessSteps | |||||||
| Bool | reset | |||||||
| Identifier | Data type | Default value | Description |
|---|---|---|---|
| startValue | Int | 0 | Start value at which the signal begins. |
| timeRange | Time | T#0s | Time after which the output parameter `value` is incremented |
| incrementRange | Int | 0 | Size of the jump from one increment to the next. |
| numberSteps | Int | 0 | Number of increments per sawtooth. (In the case of an endless sawtooth signal, this information is not necessary). |
| endlessSteps | Bool | FALSE | Specifies whether an endless sawtooth signal will be generated. `TRUE` - Activated, `FALSE` - Disabled |
| reset | Bool | FALSE | Sawtooth starts again at the start value, `startValue`. |
| Identifier | Data type | Description |
|---|---|---|
| value | Int | Current value of the sawtooth signal. |
reset.The block calculates the values for a sawtooth-shaped signal profile, which is output to the output parameter value. The signal begins with the start value startValue and is added with the value increment after each elapse of the time interval timeRange. The value can also be negative.
If the variable endlessSteps is set to FALSE, the number of add operations is counted. If this exceeds the value numberSteps, the output parameter value is set back to the start value. A new sawtooth begins.
If the variable endlessSteps is set to TRUE, the value increment is added without interruption, starting once at startValue. If the maximum positive INT value range (32767) of the output parameter value is exceeded, value changes to the maximum negative INT value range (-32768) and will continue to be added up.
endlessSteps on FALSE is calculated as follows:
| Version & Date | Change description | |
|---|---|---|
| 1.0.0 | Siemens Industry Online Support | |
| 19.08.2015 | First released version | |
| 1.0.1 | Siemens Industry Online Support | |
| 02.11.2015 | Bug fix | |
| 1.0.2 | Siemens Industry Online Support | |
| 02.01.2017 | Upgrade: TIA Portal V14 Update 1 | |
| 1.0.3 | Siemens Industry Online Support | |
| 17.08.2018 | Upgrade: TIA V15 Update 2 | |
| 1.0.4 | Siemens Industry Online Support | |
| 23.11.2018 | Upgrade: TIA V15.1 | |
| 1.0.10 | Simatic Systems Support | |
| 23.09.2019 | Code refactoring, regions and more comments added | |
| 3.0.1 | Simatic Systems Support | |
| 15.02.2021 | Insert documentation | |